<!--分页-->
<div th:fragment="page(pageInfo, link)" class="" th:if="${pageInfo.total > 0}">
    <section>
        <div class="page">
            <a class="first" th:if="${pageInfo.pageNum > 1}" th:href="@{${link}(page=1)}">首页</a>
            <a class="prev" th:if="${pageInfo.pageNum > 1}" th:href="@{${link}(page=${pageInfo.pageNum - 1})}">上一页</a>
            <a class="num" th:if="${pageInfo.pageNum - 2 > 0}" th:href="@{${link}(page=${pageInfo.pageNum - 2})}" th:text="${pageInfo.pageNum - 2}"></a>
            <a class="num" th:if="${pageInfo.pageNum - 1 > 0}" th:href="@{${link}(page=${pageInfo.pageNum - 1})}" th:text="${pageInfo.pageNum - 1}"></a>
            <span class="current" th:text="${pageInfo.pageNum}"></span><!--当前页-->
            <a class="num" th:if="${pageInfo.pageNum + 1 <= pageInfo.pages}" th:href="@{${link}(page=${pageInfo.pageNum + 1})}" th:text="${pageInfo.pageNum + 1}"></a>
            <a class="num" th:if="${pageInfo.pageNum + 2 <= pageInfo.pages}" th:href="@{${link}(page=${pageInfo.pageNum + 2})}" th:text="${pageInfo.pageNum + 2}"></a>
            <a class="next" th:if="${pageInfo.pageNum < pageInfo.pages}" th:href="@{${link}(page=${pageInfo.pageNum + 1})}">下一页</a>
            <a class="end" th:if="${pageInfo.pageNum < pageInfo.pages}" th:href="@{${link}(page=${pageInfo.pages - 1})}">末页</a>
            <span class="rows" th:text="'共 ' +@{(${pageInfo.total})} + ' 条记录'"></span>
        </div>
    </section>
</div>
<!--分页结束-->